extends ./base.jade

block content
    link(rel="stylesheet", href="/css/account.css")
    div
        h1 All Accounts
        table.table
            thead
                tr
                    th AccName
                    th UserName
            tbody
                each acc in accs
                    tr(style={
                            cursor: 'pointer'
                        } 
                        onclick= `jumpToAccDetials(${acc.id})`
                    )
                        td= acc.accName
                        td= acc.username
                tr
                    td(colspan=2)
                        a.btn.btn-light(style={
                            width: '12em'
                        } href= `/account/add.html`
                        ) Add an Acc
    script.
        function jumpToAccDetials(id) {
            window.location.href= `/account/${id}`
        }
